{% extends "process.html" %}
{% block process_content %}
    <table class="table">
        <tr class="skip-border">
            <td>PID</td>
            <td>{{ process.pid }}</td>
        </tr>
        {% if process.parent_name %}
        <tr>
            <td>Parent</td>
            <td><a href="{{ url_for(".process", pid=process.ppid) }}">{{ process.parent_name }}</a> ({{ process.ppid }})</td>
        </tr>
        {% endif %}
        <tr>
            <td>Command</td>
            <td>
                {{ process.cmdline }}
            </td>
        </tr>
        <tr>
            <td>User</td>
            <td>{{ process.user or "-"}}</td>
        </tr>
        <tr>
            <td>User ids</td>
            <td>
                <table class="table table-bordered">
                    <tr>
                        <td>real</td>
                        <td>{{ process.uid_real }}</td>
                    </tr>
                    <tr>
                        <td>effective</td>
                        <td>{{ process.uid_effective }}</td>
                    </tr>
                    <tr>
                        <td>saved</td>
                        <td>{{ process.uid_saved }}</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>Group ids</td>
            <td>
                <table class="table table-bordered">
                    <tr>
                        <td>real</td>
                        <td>{{ process.gid_real }}</td>
                    </tr>
                    <tr>
                        <td>effective</td>
                        <td>{{ process.gid_effective }}</td>
                    </tr>
                    <tr>
                        <td>saved</td>
                        <td>{{ process.gid_saved }}</td>
                    </tr>
                </table>
            </td>
        </tr>

        <tr>
            <td>Memory</td>
            <td>
                <table class="table table-bordered">
                    <tr>
                        <td>rss</td>
                        <td>{{ process.mem_rss|filesizeformat }}</td>
                    </tr>
                    <tr>
                        <td>vms</td>
                        <td>{{ process.mem_vms|filesizeformat }}</td>
                    </tr>
                    <tr>
                        <td>shared</td>
                        <td>{{ process.mem_shared|filesizeformat }}</td>
                    </tr>
                    <tr>
                        <td>text</td>
                        <td>{{ process.mem_text|filesizeformat }}</td>
                    </tr>
                    <tr>
                        <td>lib</td>
                        <td>{{ process.mem_lib|filesizeformat }}</td>
                    </tr>
                    <tr>
                        <td>data</td>
                        <td>{{ process.mem_data|filesizeformat }}</td>
                    </tr>
                    <tr>
                        <td>dirty</td>
                        <td>{{ process.mem_dirty|filesizeformat }}</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>Terminal</td>
            <td>{{ process.terminal }}</td>
        </tr>
        <tr>
            <td>Status</td>
            <td>{{ process.status }}</td>
        </tr>
        <tr>
            <td>Nice</td>
            <td>{{ process.nice }}</td>
        </tr>
        <tr>
            <td>I/O Nice</td>
            <td>class: {{ process.io_nice_class }}, value: {{ process.io_nice_value }}</td>
        </tr>
        <tr>
            <td>CWD</td>
            <td>{{ process.cwd }}</td>
        </tr>
        <tr>
            <td># File-descriptors</td>
            <td>{{ process.num_files }}</td>
        </tr>
        <tr>
            <td># Threads</td>
            <td>{{ process.num_threads }}</td>
        </tr>
        <tr>
            <td>
                # Context-switches
            </td>
            <td>
                <table class="table table-bordered">
                    <tr>
                        <td>voluntary</td>
                        <td>{{ process.num_ctx_switches_vol }}</td>
                    </tr>
                    <tr>
                        <td>involuntary</td>
                        <td>{{ process.num_ctx_switches_invol }}</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>CPU times</td>
            <td>
                <table class="table table-bordered">
                    <tr>
                        <td>user</td>
                        <td>{{ process.cpu_times_user }}</td>
                    </tr>
                    <tr>
                        <td>system</td>
                        <td>{{ process.cpu_times_system }}</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>CPU affinity</td>
            <td>{{ process.cpu_affinity|join(", ") }}</td>
        </tr>
    </table>
{% endblock %}
